<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "{{%exchange_order}}".
 *
 * @property integer $id
 * @property integer $c_id
 * @property string $orderId
 * @property string $title
 * @property integer $type
 * @property integer $price
 * @property integer $create_time
 * @property integer $flag
 */
class ExchangeOrder extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%exchange_order}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['c_id', 'orderId', 'title', 'type', 'price', 'create_time'], 'required'],
            [['c_id', 'type', 'price', 'create_time', 'flag'], 'integer'],
            [['orderId', 'title'], 'string', 'max' => 255],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'c_id' => 'C ID',
            'orderId' => 'Order ID',
            'title' => 'Title',
            'type' => 'Type',
            'price' => 'Price',
            'create_time' => 'Create Time',
            'flag' => 'Flag',
        ];
    }
}
